---
id: 5f1a80975fc4bcae0edb3497
title: Hatua ya 49
challengeType: 0
dashedName: step-49
---

# --description--

Ukichagua kitufe cha redio cha `Indoor` na kuwasilisha fomu, data ya fomu ya kitufe inategemea sifa zake za `name` na `value`. Kwa kuwa vitufe vyako vya redio havina sifa ya `value`, data ya fomu itajumuisha `indoor-outdoor=on`, ambayo si muhimu ukiwa na vitufe vingi.

Ongeza sifa ya `value` kwa vitufe vyote vya redio. Kwa urahisishaji, weka sifa ya `value` kwa kila kitufe na thamani sawa na sifa yake ya `id`.

# --hints--

Vitufe vyote vya redio bado vinapaswa kupatikana kati ya tagi za kufungua na kufunga za vipengee vya `label`.

```js
const labelChildNodes = [...document.querySelectorAll('form > label')].map(
  (node) => node.childNodes
);
assert(
  labelChildNodes.filter((childNode) => childNode[0].nodeName === 'INPUT')
    .length === 2
);
```

Vitufe vyote vya redio vinapaswa kuwa na sifa ya `value`. Hakikisha kuwa kuna nafasi baada ya jina la tagi inayofungua na/au kuna nafasi kabla ya majina yote ya sifa.

```js
const radioButtons = [...document.querySelectorAll('input[type="radio"]')];
assert(radioButtons.every((btn) => btn.hasAttribute('value')));
```

Vitufe vyako vyote vya redio vinapaswa kuwa na sifa ya `type`. Hakikisha kuwa kuna nafasi baada ya jina la tagi inayofungua na/au kuna nafasi kabla ya majina yote ya sifa.

```js
const radioButtons = [...document.querySelectorAll('input')];
assert(radioButtons.every((btn) => btn.hasAttribute('type')));
```

Kitufe cha redio cha `Indoor` cha sifa ya `value` inapaswa kuwekwa kuwa `indoor`. Aidha umesahau maandishi, au kuna makosa ya maandishi. Kumbuka kwamba thamani za sifa zinapaswa kuzungukwa na alama za nukuu.

```js
const indoorRadioButton = document.querySelector('#indoor');
assert(indoorRadioButton.getAttribute('value').match(/^indoor$/));
```

Kitufe cha redio cha `Outdoor` cha sifa ya `value` inapaswa kuwekwa kuwa `outdoor`. Aidha umesahau maandishi, au kuna makosa ya maandishi. Kumbuka kwamba thamani za sifa zinapaswa kuzungukwa na alama za nukuu.

```js
const outdoorRadioButton = document.querySelector('#outdoor');
assert(outdoorRadioButton.getAttribute('value').match(/^outdoor$/));
```

# --seed--

## --seed-contents--

```html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
      <section>
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">
--fcc-editable-region--
          <label><input id="indoor" type="radio" name="indoor-outdoor"> Indoor</label>
          <label><input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label>
--fcc-editable-region--
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>
        </form>
      </section>
    </main>
  </body>
</html>
```

